<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Hello Thymeleaf!</title>
    <script th:src="@{/js/jquery.min.js}" type="text/javascript"></script>
    <script th:src="@{/js/login.js}" type="text/javascript"></script>
</head>
<body>
    <h1>欢迎登陆<span th:text="${session.username}"></span></h1>
    <a href="/chat">聊天</a>

    <a href="/logout"  th:if="${not #lists.isEmpty(session.username)}">退出登录</a>

    <a href="login.html"  th:if="${#lists.isEmpty(session.username)}">登录</a>
</body>
</html>